package spec.tianjunxiu.unit4.zuoyedongwu;

public abstract class Animal {
    String name ;
    String food ;
    String area ;

    Animal(String n, String f, String a) {
        name = n;
        food = f;
        area = a;
    }

    public Animal() {
    }
//抽象方法没有方法体
    abstract String findFood();
    String eat() {
        return  this.name+"吃"+this.food;
    }
    abstract void wholeLife();

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getFood() {
        return food;
    }

    public void setFood(String food) {
        this.food = food;
    }

    public String getArea() {
        return area;
    }

    public void setArea(String area) {
        this.area = area;
    }
}
